package com.example.di;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Example {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext =
                new AnnotationConfigApplicationContext(DIConfig.class);

        UseFunctionService srv = applicationContext.getBean(UseFunctionService.class);
        String msg = srv.sayHello("world");
        System.out.println(msg);
        applicationContext.close();
    }
}

